package com.yonyou.gmmc.service.pointactivity.dao;

import java.util.List;
import java.util.Map;

import com.yonyou.gmmc.common.annotation.OracleDb;
import com.yonyou.gmmc.service.pointactivity.model.QuestionBo;
import com.yonyou.gmmc.service.pointactivity.model.TtQneResult;

import tk.mybatis.mapper.common.Mapper;

@OracleDb
public interface QuestionnaireMapper extends Mapper<TtQneResult>{
	
	//查询答题记录
	public List<QuestionBo> queryIfAnswer(Map<String, Object> map);

	//查询对应的题目信息
	public List<QuestionBo> queryQuestionByQtnNo(Map<String, Object> map);
	
	//删除对应答题记录
	public void deleteByQtnAndUserId(Map<String, Object> map);

	//保存答题记录
	public void saveAnswer(Map<String, Object> map);
	
	//查询客户问卷号
	public String queryId(Map<String, Object> map);

	//添加问卷提交时间
	public void updateReplaySubmitTime(Map<String, Object> map);

	//生成用户调查问卷
	public void insertQuestionnaire(Map<String, Object> map);

	//删除第一题之后的答题记录
	public void deleteAfterFirstQuestionAnswer(Map<String, Object> map);

	//获取第一题答案为是的 答案id
	public String getAnswerYes();
	
	//根据openId 问卷名获取题号
	public String getQtnNoByOpenId(Map<String,Object> map);
}